﻿using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace ServerSide.Model
{
    
    public class Menu
    {
        [Key]
        [Column("id")]
        public int Id { get; set; }
        /// <summary>
        /// 父级路径
        /// </summary>
        [Column("parentId")]
        public int ParentId { get; set; }
        /// <summary>
        /// 菜单名
        /// </summary>
        [Column("name")]
        public String? Name { get; set; }
        /// <summary>
        /// 侧边栏展示名称
        /// </summary>
        [Column("label")]
        public String? Label { get; set; }
        /// <summary>
        /// 索引路径
        /// </summary>
        [Column("path")]
        public String? Path { get; set; }
        /// <summary>
        /// 权限
        /// </summary>
        [Column("perms")]
        public String? Perms { get; set; }
        [Column("icon")]
        public String? Icon { get; set; }
        /// <summary>
        /// 页面路由路径
        /// </summary>
        [Column("url")]
        public String? Url { get; set; }
        /// <summary>
        /// menu类型：目录、菜单、按钮
        /// </summary>
        [Column("menuType")]
        public String? MenuType { get; set; }
        /// <summary>
        /// 排序
        /// </summary>
        [Column("menuSort")]
        public int? MenuSort { get; set; }
        /// <summary>
        /// 页面是否存活
        /// </summary>
        [Column("keepAlive")]
        public int? KeepAlive { get; set; }
        [Column("createTime")]
        public String? CreateTime { get; set; }
        [Column("updateTime")]
        public String? UpdateTime { get; set; }
        [Column("createBy")]
        public String? CreateBy { get; set; }
        [Column("enable")]
        public int? Enable { get; set; }
        [NotMapped]
        public List<Menu>? Children { get; set; }
    }
}
